package models;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

import play.db.jpa.Model;

@Entity
public class Contract extends Model {
	public String name1;
	public String name2;
	public String mobile1;
	public String mobile2;
	public String phone1;
	public String phone2;
	public String area;
	public long contract_id;
	public int year;
	public Date date;
	public String address;
	public String floor_type;
	public ArrayList<Product> plist;
	public ArrayList<String> plistNames = new ArrayList<String>();

	
	@OneToMany (mappedBy="contract")
	public List<Product> products ;
	

	public Contract(String name1,
			String name2,
			String mobile1,
			String mobile2,
			String phone1,
			String phone2,
			String area,
			long contract_id ,
			int year,
			Date date,
			String address,			
			String floor_type,
			ArrayList<Product> pl)
	{
		
		this.name1 = name1;
		this.name2 = name2;
		this.mobile1=mobile1;
		this.mobile2=mobile2;
		this.phone1=phone1;
		this.phone2=phone2;
		this.area=area;
		this.contract_id=contract_id;
		this.year=year;
		this.date=date;
		this.address=address;
		this.floor_type=floor_type;
		this.plist = pl;
		

	}
	
	/*
	public int quantity1;
	public int quantity2;
	public int quantity3;
	public int quantity4;
	public int quantity5;
	
	public int no_of_change_per_month1;
	public int no_of_change_per_month2;
	public int no_of_change_per_month3;
	public int no_of_change_per_month4;
	public int no_of_change_per_month5;
	
	public int item1_price;
	public int item2_price;
	public int item3_price;
	public int item4_price;
	public int item5_price;
	
	public String smell1;
	public String smell2;
	public String smell3;
	public String smell4;
	public String smell5;
	public int total1_price;
	public int total2_price;
	public int total3_price;
	public int total4_price;
	public int total5_price;
*/


/*
	public Contract(String name1,String name2,
			String address,long contract_id ,Date date, 
			String Product1,String Product2,String Product3,String Product4,String Product5,
			int quantity1,int quantity2,int quantity3,int quantity4,int quantity5, 
			int no_of_change_per_month1,int no_of_change_per_month2,int no_of_change_per_month3,int no_of_change_per_month4,int no_of_change_per_month5, 
			int item1_price,int item2_price,int item3_price,int item4_price,int item5_price,
			int total1_price,int total2_price,int total3_price,int total4_price,int total5_price,
			String mobile1,String mobile2, String floor_type, String phone1,String phone2,
			String area, int year, 
			String smell1,String smell2,String smell3,String smell4,String smell5) {

		this.name1 = name1;
		this.name2 = name2;

		this.contract_id=contract_id;
		this.year=year;
		this.date = date;
		this.Product1 = Product1;
		this.Product2 = Product2;
		this.Product3 = Product3;
		this.Product4 = Product4;
		this.Product5 = Product5;
		this.quantity1 = quantity1;
		this.quantity2 = quantity2;
		this.quantity3 = quantity3;
		this.quantity4 = quantity4;
		this.quantity5 = quantity5;
		
		this.no_of_change_per_month1 = no_of_change_per_month1;
		this.no_of_change_per_month2 = no_of_change_per_month2;
		this.no_of_change_per_month3 = no_of_change_per_month3;
		this.no_of_change_per_month4 = no_of_change_per_month4;
		this.no_of_change_per_month5 = no_of_change_per_month5;
	
		this.item1_price = item1_price;
		this.item2_price = item2_price;
		this.item3_price = item3_price;
		this.item4_price = item4_price;
		this.item5_price = item5_price;

		this.total1_price=total1_price;
		this.total2_price=total2_price;
		this.total3_price=total3_price;
		this.total4_price=total4_price;
		this.total5_price=total5_price;
		
		this.smell1=smell1;
		this.smell2=smell2;
		this.smell3=smell3;
		this.smell4=smell4;
		this.smell5=smell5;
		
		this.mobile1 = mobile1;
		this.mobile2 = mobile2;
		this.floor_type = floor_type;
		this.phone1 = phone1;
		this.phone2 = phone2;
		this.area=area;
				
	}
	*/
	
}
